<template>
  <div class="form-preview-group">
    <label>{{_displayName}} <span class="form-preview-notNull" v-if="field.isNull == 0">*</span></label>
    <div class="form-preview-mock">
      <p class="form-preview-control" :class="{'form-preview-withIcon': isCode}">
        <i class="iconfont icon-scan" v-if="isCode"></i>
      </p>
    </div>
  </div>
</template>

<script>
import { previewProps } from '@src/component/form/components/props';
import translate from '@src/component/form/mixin/translate.js'

export default {
  name: 'form-link-preview',
  mixins: [translate],
  props: previewProps,
  computed: {
    /** 是否为扫码类型 */
    isCode(){
      return this.field.formType == 'code';
    }
  }
}
</script>